<?php
if (!defined('TOBBIVM'))
	header('location:/template/notrepassing.php');
/**
 * This file is part of TobbiVMShop.
 *
 * TobbiVMShop is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * TobbiVMShop is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with TobbiVMShop.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * Template for User->Admin->Editor
 * used from admin.page.editor.php
 * 
 * @version    $Id$
 * @package    TobbiVM-Shop
 * @copyright  Copyright (C) 2012
 * @author     Norbert Gebert
 * @license    GPL3
 */
/**
 * Usable Elements to display articles
 * {idx}				= Customer-ID, not alterable
 * {id}				= Header for idx 
 * {companyx}		= Customer company
 * {company}		= Header for companyx
 * {firstnamex}	= Customer firstname
 * {firstname}		= Header for firstnamex
 * {lastnamex}		= Customer lastname
 * {lastname}		= Header for lastnamex
 * {streetx}		= Customer street
 * {street}			= Header for streetx
 * {zipx}			= Customer zip
 * {zip}				= Header for zipx
 * {cityx}			= Customer city
 * {city}			= Header for cityx
 * {countryx}		= Customer contry, <option>-Tags
 * {contry}			= Header for contryx
 * {statex}			= Customer state, not alterable
 * {state}			= Header for statex
 * {faxx}			= Customer fax
 * {fax}				= Header for faxx
 * {handyx}			= Customer handy
 * {handy}			= Header for handyx
 * {emailx}			= Customer email
 * {email}			= Header for emailx
 * {levelx}			= Customer level
 * {level}			= Header for levelx
 * {namex}			= Customer name
 * {name}			= Header for namex
 * {passwordx}		= Customer password
 * {password}		= Header for passwordx
 * {lastonlinex}	= Customer lastonline, not alterable
 * {lastonline}	= Header for lastonlinex
 * {ipx}				= Customer ip, not alterable
 * {ip}				= Header for ipx
 * {textx}			= Customer text = info
 * {text}			= Header for textx
 * {errorsx}		= Customer Login-Errors, not alterable
 * {errors}			= Header for lastonlinex
 * {activex}		= Customer isactive
 * {active}			= Header for activex
 */
?>
<h2>{pageTitel}</h2>

<div class="form">
	<form action="{formStart}" method="post" class="niceform" enctype="multipart/form-data">
		<fieldset>
			<dl>
				<dt><label for="idx">{id}</label></dt>
				<dd>
					<input type="text" name="idx" id="idx" disabled="disabled" 
							 size="8" value="{idx}"/>					
				</dd>
			</dl>

			<dl>
				<dt><label for="companyx">{company}</label></dt>
				<dd>
					<input type="text" name="companyx" id="companyx" size="50" value="{companyx}"/>					
				</dd>
			</dl>

			<dl>
				<dt><label for="firstnamex">{firstname}</label></dt>
				<dd>
					<input type="text" name="firstnamex" id="firstnamex" size="50" value="{firstnamex}"/>					
				</dd>
			</dl>

			<dl>
				<dt><label for="lastnamex">{lastname}</label></dt>
				<dd>
					<input type="text" name="lastnamex" id="lastnamex" size="50" value="{lastnamex}"/>					
				</dd>
			</dl>

			<dl>
				<dt><label for="streetx">{street}</label></dt>
				<dd>
					<input type="text" name="streetx" id="streetx" size="50" value="{streetx}"/>					
				</dd>
			</dl>

			<dl>
				<dt><label for="zipx">{zip}</label></dt>
				<dd>
					<input type="text" name="zipx" id="zipx" size="50" value="{zipx}"/>					
				</dd>
			</dl>

			<dl>
				<dt><label for="cityx">{city}</label></dt>
				<dd>
					<input type="text" name="cityx" id="cityx" size="50" value="{cityx}"/>					
				</dd>
			</dl>

			<dl>
				<dt><label for="countryx">{country}</label></dt>
				<dd>
					<select size="1" name="countryx" id="countryx">
						{countryx}
					</select>
				</dd>
			</dl>

			<dl>
				<dt><label for="statex">{state}</label></dt>
				<dd>
					<input type="text" name="statex" id="statex" size="50" disabled="disabled" value="{statex}"/>					
				</dd>
			</dl>

			<dl>
				<dt><label for="phonex">{phone}</label></dt>
				<dd>
					<input type="text" name="phonex" id="phonex" size="50" value="{phonex}"/>					
				</dd>
			</dl>

			<dl>
				<dt><label for="faxx">{fax}</label></dt>
				<dd>
					<input type="text" name="faxx" id="faxx" size="50" value="{faxx}"/>					
				</dd>
			</dl>

			<dl>
				<dt><label for="handyx">{handy}</label></dt>
				<dd>
					<input type="text" name="handyx" id="handyx" size="50" value="{handyx}"/>					
				</dd>
			</dl>

			<dl>
				<dt><label for="emailx">{email}</label></dt>
				<dd>
					<input type="text" name="emailx" id="emailx" size="50" value="{emailx}"/>					
				</dd>
			</dl>

			<dl>
				<dt><label for="activx">{active}</label></dt>
				<dd>
					<input type="checkbox" name="activex" id="activex" value="activex" {activex}/>
				</dd>
			</dl>

			<dl>
				<dt><label for="levelx">{level}</label></dt>
				<dd>
					{levelx}
				</dd>
			</dl>

			<dl>
				<hr>
			</dl>

			<dl>
				<dt><label for="namex">{name}</label></dt>
				<dd>
					<input type="text" name="namex" id="namex" size="50" value="{namex}"/>					
				</dd>
			</dl>
			
			<dl>
				<dt><label for="passwordx">{password}</label></dt>
				<dd>
					<input type="text" name="passwordx" id="passwordx" size="50" disabled="disabled" value="{passwordx}"/>					
				</dd>
			</dl>
			
			<dl>
				<dt><label for="lastonlinex">{lastonline}</label></dt>
				<dd>
					<input type="text" name="lastonlinex" id="lastonlinex" size="50" disabled="disabled" value="{lastonlinex}"/>					
				</dd>
			</dl>
			
			<dl>
				<dt><label for="ipx">{ip}</label></dt>
				<dd>
					<input type="text" name="ipx" id="ipx" size="50" disabled="disabled" value="{ipx}"/>					
				</dd>
			</dl>
			
			<dl>
				<dt><label for="errorsx">{errors}</label></dt>
				<dd>
					<input type="text" name="errorsx" id="errorsx" size="50" value="{errorsx}"/>					
				</dd>
			</dl>
			
			<dl>
				<textarea style="visibility: hidden; display: none;" class="ckeditor"
							 name="textx" id="textx" rows="25" cols="56">{textx}</textarea>
			</dl>

			<dl class="submit">
				{btnSave}
				{btnAbort}
				{btnPassword}
			</dl>
		</fieldset>
	</form>
</div>
<script type="text/javascript" src="{tpl_js}ckeditor.mini.js"></script>	
<script type="text/javascript">
function validate_editor(){
// To solve the error of using Ckeditor with jquery validation
CKEDITOR.instances.content.updateElement();
}
</script>